<?php
/*cinclude 'proses/konek';*/

class render
{

	private $stylesheets=array(), $javascripts=array();
	
	public function login ()
	{
		require_once('plugin/login.php');
		$login =new login;
	}
	public function register ()
	{
		require_once('plugin/register.php');
		$register =new register;
	}
	
	public function navigasi()
	{
		require_once('plugin/navbar.php');
		$img='uploads/itm/img/tetrasmalogo.png';
		$hrf='dashboard.php';
		$kanan='2';
		$menu1=array('MENU');
		$link1=array('#menu-toggle');
		$Id1=array('menu-toggle');
		$kiri='3';
		$menu2=array('LOGOUT');
		$link2=array('../proses/logout.php');
		$Id2=array('');

		$navbar= new Navbar;
		$navbar->kanan=$kanan;
		$navbar->Menu1=$menu1;
		$navbar->link1=$link1;
		$navbar->id1=$Id1;
		$navbar->kiri=$kiri;
		$navbar->Menu2=$menu2;
		$navbar->link2=$link2;
		$navbar->id2=$Id2;
		$navbar->img=$img;
		$navbar->hrf_img=$hrf;	
		$navbar->run();	
	}

	public function homenavigasi()
	{
		$img='page/uploads/itm/img/tetrasmalogo.png';
		$hrf='';
		$kanan='0';
		$menu1=array('');
		$link1=array('');
		$Id1=array('');
		$kiri='2';
		$menu2=array('LOGIN','REGISTER','HELP');
		$link2=array('#login','#registration','#help');
		$Id2=array(' ',' ','');
		require_once('plugin/navbar.php');
		$navbar= new Navbar;
		$navbar->kanan=$kanan;
		$navbar->Menu1=$menu1;
		$navbar->link1=$link1;
		$navbar->id1=$Id1;
		$navbar->kiri=$kiri;
		$navbar->Menu2=$menu2;
		$navbar->link2=$link2;
		$navbar->id2=$Id2;
		$navbar->img=$img;
		$navbar->hrf_img=$hrf;	
		$navbar->run();	
	}
	
	public function carousel()
	{
	  include 'proses/konek.php';
	  $coba=mysql_query("SELECT isi FROM atribut WHERE nm_attrib = 'carousel' ");
	  $img4=mysql_fetch_array($coba);
	  require_once('plugin/carousel.php');
	  $carousel = new carousel;
	  $carousel->img=unserialize($img4['isi']);
	  $carousel->run();
	}
	public function icon()
	{
		include 'proses/konek.php';
		$sql=mysql_query("SELECT isi FROM atribut WHERE nm_attrib='icon'");
		$icon=mysql_fetch_assoc($sql);
		echo '<link rel="icon" type="image/ico" href="'.$icon['isi'].'">';
	}
	public function footer()
	{
		require("plugin/footer.php");
		$footer = new footer;
		$footer->isi();
	}
	public function profile($status, $username)
	{
		include 'plugin/siswa.php';
    	$profile = new profile;
    	$profile->init($status, $username);
	}
	public function run($path)
	{
		ob_start();
		include($path);
		return ob_get_clean();	
	}
	
	
}

?>